import request from '@/utils/request';

// ��¼����
export function login(username, password, code, uuid) {
  const data = {
    username,
    password,
    code,
    uuid,
  };
  return request({
    url: '/login',
    headers: {
      isToken: false,
    },
    method: 'post',
    data: data,
  });
}

// ע�᷽��
export function register(data) {
  return request({
    url: '/register',
    headers: {
      isToken: false,
    },
    method: 'post',
    data: data,
  });
}

// ��ȡ�û���ϸ��Ϣ
export function getInfo() {
  return request({
    url: '/getInfo',
    method: 'get',
  });
}

// �˳�����
export function logout() {
  return request({
    url: '/logout',
    method: 'post',
  });
}

// ��ȡ��֤��
export function getValidCodeImg() {
  return request({
    url: '/captchaImage',
    headers: {
      isToken: false,
    },
    method: 'get',
    timeout: 20000,
  });
}
